﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BoriPeter.FitnessJournal8.Models
{
    public class DateNamed : ModelBase
    {
        #region Label
        private string label;
        public string Label
        {
            get
            {
                return this.label;
            }

            set
            {
                this.label = value;
                NotifyOfPropertyChange("Label");
            }
        }
        #endregion

        #region Name
        private string name;
        public string Name
        {
            get
            {
                return this.name;
            }

            set
            {
                this.name = value;
                NotifyOfPropertyChange("Name");
            }
        }
        #endregion

        #region Date
        private DateTime date;
        public DateTime Date
        {
            get
            {
                return this.date;
            }

            set
            {
                this.date = value;
                this.name = date.ToString();
                NotifyOfPropertyChange("Date");
            }
        }
        #endregion

        #region Constructor
        public DateNamed(string _label, DateTime _date)
            : base()
        {
            Label = _label;
            Date = _date;
        }
        #endregion

        #region DefaultList
        public static List<DateNamed> DefaultList
        {
            get
            {
                var list = new List<DateNamed>();
                list.Add(new DateNamed("Today", DateTime.Now));
                list.Add(new DateNamed("Yesterday", DateTime.Now.AddDays(-1)));
                list.Add(new DateNamed("Tommorow", DateTime.Now.AddDays(1)));

                return list;
            }
        }
        #endregion
    }
}
